package com.navi.loaddata.core.oracleEntity;

import com.navi.loaddata.core.oracleEntity.array.EtlArrayResultV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellResultV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2ResultV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfResultV;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Created by Jay on 2018/3/27.
 */

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface EtlResultVMapper {

    EtlResultVMapper INSTANCE = Mappers.getMapper(EtlResultVMapper.class);

    EtlArrayResultV etlGlassToArray(EtlResultV glassVMapper);
    List<EtlArrayResultV> etlGlassToArray(List<EtlResultV> list);


    EtlCfResultV etlGlassToCf(EtlResultV glassVMapper);
    List<EtlCfResultV> etlGlassToCf(List<EtlResultV> list);

    @Mapping(target = "componentId",source = "glassId")//属性名不一致映射
    @Mapping(target = "componentEndTime",source = "glassEndTime")//属性名不一致映射
    EtlCellResultV etlGlassToCell1(EtlResultV glassVMapper);
    List<EtlCellResultV> etlGlassToCell1(List<EtlResultV> list);

    @Mapping(target = "chipId",source = "glassId")//属性名不一致映射
    @Mapping(target = "chipEndTime", source = "glassEndTime")//属性名不一致映射
    EtlCell2ResultV etlGlassToCell2(EtlResultV glassVMapper);
    List<EtlCell2ResultV> etlGlassToCell2(List<EtlResultV> list);

}
